<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="李愧愧">
    <title></title>
    <style>
        
    </style>
</head>
<body>
    
<script>
    var str=prompt('请输入一个字符串：');
    var strs='';
    for(var i=0;i<str.length;i++){
        if(strs.indexOf(str[i])==-1){
            strs=strs+str[i];
        }
    }
    alert(strs);
</script>
</body>
<ml>